﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;


namespace TMRCPUEMULATOR
{
    class Program
    {
        static Emulator emu;
        static void Main(string[] args)
        {
            Assembler assembler = new Assembler("ahmed.txt");
            assembler.OutputBinary("binary");
            assembler.Dispose();
            emu = new Emulator("binary");
 
            Thread t = new Thread(run);
            t.Start();

            emu.PrintCodeMemory();


            while (true)
            {
                if (Console.ReadLine()=="1")
                {
                    Console.WriteLine(emu.ACC);
                }
                
                
            }
        }
        public static void run()
        {

            emu.Run(1);
        }
    }
}
